#include <stdio.h>
#include <conio.h>
#include <iostream>
#include <algorithm>
#include <limits>
#include <time.h>
#define Max 100000


int random_in_range (unsigned int min, unsigned int max)
{
  //Randomize
	int base_random = rand(); /* in [0, RAND_MAX] */
	if (RAND_MAX == base_random) return random_in_range(min, max);
  /* now guaranteed to be in [0, RAND_MAX) */
	int range       = max - min,
      remainder   = RAND_MAX % range,
      bucket      = RAND_MAX / range;
  /* There are range buckets, plus one smaller interval
     within remainder of RAND_MAX */
  if (base_random < RAND_MAX - remainder) {
    return min + base_random/bucket;
  } else {
    return random_in_range (min, max);
  }
}

void RandomGenerate(int a[], int n)
{
	for(int i = 1; i <= n; i++)
	{
		a[i] = random_in_range(1, 100);
	}
}

void PrintfArray(int a[], int n)
{
	for(int i = 1; i <= n; i++)
	{
		printf("  %d", a[i]);
	}
}
int main()
{



	getch();
	return 0;
}